package br.com.sged.controle;

import java.util.ArrayList;
import java.util.List;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;

import br.sged.modelo.Professor;
@ManagedBean
@ViewScoped
public class ProfessorBean 
{
	private Professor professor;
	private List<Professor> listProf;
	
	public ProfessorBean()
	{
		this.professor = new Professor();
	}
	public Professor getProfessor()
	{
		return this.professor;
	}
	public void adicionarProfessor()
	{
		if(this.listProf == null)
		{
			this.listProf = new ArrayList<Professor>();
		}
		this.listProf.add(this.professor);
		this.professor = new Professor();
	}
	public List<Professor> getListaProfessor(){
		
		return this.listProf;
	}
}
